﻿using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Cofe.Core.Script
{
    [Export(typeof(ICofeService))]
    [ServicePriority(ServicePriorityAttribute.DefaultPriority_COFE)]
    public class ScriptServices : IScriptServices
    {
        #region Constructor

        public ScriptServices()
        {
            Parser = null;
            CommandList = new ScriptCommandManager();
            RunnerSpawner = new ScriptRunner();
        }
        
        #endregion

        #region Methods

        public Task CreateTask(string cmdLine)
        {
            throw new NotImplementedException();
        }

        public void Execute(Queue<IScriptCommand> cmds, ScriptParameterDic initialParameters)            
        {
            RunnerSpawner.Run(cmds, initialParameters);
        }
        
        #endregion

        #region Data
        
        #endregion

        #region Public Properties

        public IScriptParser Parser { get; private set; }
        public IScriptCommandProviderManager CommandList { get; private set; }
        public IScriptRunner RunnerSpawner { get; private set; }
        #endregion

        

       

        
     
    }
}
